#!/bin/bash
#
#   xrkmonitor license 
#
#   Copyright (c) 2020 by rockdeng
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
#
#
#   字符云监控(xrkmonitor) 开源版 (c) 2021 by rockdeng
#   当前版本：v1.0
#   使用授权协议： apache license 2.0
#
#   开源版主页：http://open.xrkmonitor.com
#   云版本主页：http://xrkmonitor.com
#  
#
#   云版本为开源版提供永久免费告警通道支持，告警通道支持短信、邮件、
#   微信等多种方式，欢迎使用
#
#   监控插件 mysql_slave_check 功能:
#        mysql 主从同步监控，主从不同步时会记录错误日志并发送异常告警
#
#   插件开发时间：2021-11-19
#   插件开发人员：官方
#   插件开发人员云账号ID：1
#
#   脚本功能：
#       插件安装逻辑，该脚本在插件安装的时候
#       由监控 agent - slog_mtreport_client 自动调用执行
#       若脚本输出含有 failed 表示脚本执行失败
#       插件开发者可在此处添加自己的安装逻辑代码, 输出安装日志：log >> $install_log_file
#

if [ ! -x add_crontab.sh ]; then
    echo "not find add_crontab.sh !" >> $install_log_file
    echo "failed"
    exit 1
fi

./add_crontab.sh

